package com.salt.modules.notice.feign;

import com.salt.common.constant.Common;
import com.salt.modules.notice.entity.NoticeSendType;
import com.salt.modules.notice.hystrix.NoticeSendTypeClientHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Description
 * @Author salt
 * @Date 2022/4/15
 * @Version 1.0.1
 */
@FeignClient(name = Common.Service.SALT_NOTICE_SERVICE_NAME,
        path = Common.Service.SALT_NOTICE_TYPE_URL_PREFIX,
        fallbackFactory = NoticeSendTypeClientHystrix.class)
public interface NoticeSendTypeClient {

    String API_PREFIX = "/client";
    String LIST = API_PREFIX + "/list";

    @PostMapping(LIST)
    public List<NoticeSendType> findList(@RequestBody NoticeSendType noticeSendType);

}
